//
//  HBaseViewController.h
//  NursingManages
//
//  Created by HuangZhen on 2017/5/31.
//  Copyright © 2017年 huangzhen. All rights reserved.
//

#import <UIKit/UIKit.h>
//#import "HCommon.h"
//#import "UserDefault.h"


@interface HBaseViewController : UIViewController

typedef void (^Blocks) (NSDictionary *tempData,NSInteger state);

-(void) alert:(NSString*)msg ;//callbackFn: (void(^)())callback;


- (void)ManagerPost:(NSString *)URLString
         parameters:(id)parameters
             header:(NSString *)header
            success:(void (^)(id responseObject))success
            failure:(void (^)(NSError *error))failure;
- (void)ManagerGET:(NSString *)URLString
         parameters:(id)parameters
             header:(NSString *)header
            success:(void (^)(id responseObject))success
            failure:(void (^)(NSError *error))failure;



- (void)receivePOSTWithTokenURLString:(NSString *)string
                          method:(NSString *)method
                            body:(NSString *)body
                               Token:(NSString *)Token
                          Blocks:(Blocks)blocks;


@property (nonatomic, strong) UIButton *coverBtn;


- (void)clickedCoverBtnAction:(UIButton*)sender;

//字典转字符串
- (NSString*)dictionaryToJson:(NSDictionary *)dic;
//字符串转字典
- (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;

//url  UTF8转码
- (NSString *)urlUTF8:(NSString *)url;
//url 编译
- (NSString *)URLEncodedString;
//判断数字是否为整形
- (BOOL)isPureInt:(NSString*)string;

- (UIImage *)fixOrientation:(UIImage *)aImage;

//获取当前时间的前后时间
-(NSString *)getNDay:(NSInteger)n;
//获取前一周的日期
-(NSMutableArray *)latelySevenTime;
@end


